 var liFunctions = (function() {
    
     function oliClick(curEle){
        curEle.addEventListener('click',function(){
            var oliList = document.getElementsByTagName('li');
            for(var i = 0; i<oliList.length;i++){
                var curli = oliList[i];
                curli.className = '';
                if(this == oliList[i]){
                    
                    inner.style.left = (-1000) * i+ 'px';
                }
            }
            this.className = 'active';
            
        })
     }

     function bannerMouseMove(){
        banner.onmousemove = function(){
             console.log('111');
            window.clearInterval(timer);
            window.clearInterval(oliTimer);
            aLeft.style.display = aRight.style.display = 'block';
        }
        banner.onmouseleave = function(){
            aLeft.style.display = aRight.style.display = 'none';
             console.log('222');
             timer = window.setInterval(function(){
                if(i==json.jsonData.length/2 + 1){
                    inner.style.left = '0px';
                    i = 1;
            
                }
                    tween.moveAllDeraction(inner,{
                        left:-1000*i++
                    
                    },500);
                    
                    
                    
                    var curLeft = window.getComputedStyle(inner,null).left;
                
                },1000);

                oliTimer = window.setInterval(function(){
                    if(k==json.jsonData.length/2){
                        k=0;
                    }
                     for(var j = 0 ; j < oliList.length ; j++){
                         var curEle = oliList[j];
                         if(j==k){
                             curEle.className = "active";
                         }else{
                             curEle.className = "";
                         }
                     }
                     k++;
                 },1000);
            }
 } 

     return {
         bannerMouseMove:bannerMouseMove,
         oliClick:oliClick
     }



 })();